<template>
  <div>
    <a-row>
      <a-col
        :span="5"
        style="border-right: 1px solid #ccc"
        :style="{ overflow: 'auto', height: windowHeight + 'px' }"
      >
        <div style="width: 100%; display: flex; justify-content: center">
          <a-button
            size="small"
            type="primary"
            @click="showAddPlatform()"
            style="
              background: #66b1ff;
              color: #fff;
              margin-top: 15px;
              border: none;
              width: 250px;
              margin-left: 15px;
            "
          >
            新增物流平台
          </a-button>
        </div>

        <div style="padding: 0">
          <a-tree
            style="font-size: 18px"
            :expanded-keys="expandedKeys"
            :auto-expand-parent="autoExpandParent"
            :tree-data="treeData"
            @expand="onExpand"
          >
            <template slot="title" slot-scope="item" style="width: 100%">
              <p
                :style="tableId === item.id ? 'background-color: #dfede4;' : ''"
                @click.stop="rowTabData(item)"
                class="treeRow"
              >
                <span
                  style="
                    width: 185px;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                  "
                >
                  {{ item.title }}
                </span>
                <span @click.stop="changeNo" class="handle">
                  <a-switch
                    v-if="item.hierarchy == '0'"
                    :checked="item.isDisable == '0'"
                    @change="(checked) => changePlatIsDisable(checked, item)"
                  />
                  <a-switch
                    v-if="item.hierarchy == '1'"
                    :checked="item.isDisable == '0'"
                    @change="(checked) => changeSerIsDisable(checked, item)"
                  />
                  <a-icon
                    v-if="item.hierarchy == '0'"
                    class="treeIconBtn"
                    @click.stop="addTreeModal(item)"
                    type="plus"
                  />
                  <a-icon
                    v-if="item.hierarchy == '0'"
                    class="treeIconBtn"
                    type="edit"
                    @click.stop="editPlatForm(item)"
                  />
                </span>
              </p>
            </template>
          </a-tree>
        </div>
      </a-col>
      <a-col :span="19" style="border-left: 1px solid #ccc">
        <a-spin tip="Loading..." :spinning="spinning">
          <a-table
            :data-source="platformTabData"
            :pagination="false"
            :scroll="{ y: 550 }"
          >
            <a-table-column
              key="serviceName"
              data-index="serviceName"
              align="center"
              width="20%"
            >
              <span slot="title"> 物流商</span>
              <template slot-scope="text, record">
                {{ record.serviceName }}
              </template>
            </a-table-column>
            <a-table-column
              key="isEnable"
              data-index="isEnable"
              align="center"
              width="20%"
            >
              <span slot="title"> 是否启用</span>
              <template slot-scope="text, record">
                <a-checkbox
                  style="margin-bottom: 10px"
                  :checked="record.isEnableInquiry == 0"
                  @change="(e) => onChangeIsEnableInquiry(e, 'change', record)"
                >
                  启用询价
                </a-checkbox>
                <br />
                <a-checkbox
                  :checked="record.isEnablePrint == 0"
                  @change="(e) => onChangeIsEnablePrint(e, 'change', record)"
                >
                  启用打单
                </a-checkbox>
              </template>
            </a-table-column>
            <a-table-column
              key="wayTenantList"
              data-index="wayTenantList"
              align="center"
              width="20%"
            >
              <span slot="title"> 物流服务方式</span>
              <template slot-scope="text, record">
                <div v-for="(item, index) in record.wayList" :key="index">
                  <a-checkbox
                    style="margin-bottom: 10px"
                    :checked="item.isDisable == 0"
                    @change="(e) => changeListEnable(e, item)"
                  >
                    {{ item.wayName }}
                  </a-checkbox>
                </div>
              </template>
            </a-table-column>
            <a-table-column
              key="isDisable"
              data-index="isDisable"
              align="center"
              width="20%"
            >
              <span slot="title">状态</span>
              <template slot-scope="text, record">
                <span
                  :style="
                    record.isDisable == '0' ? 'color:#3eae7c' : 'color:#f00'
                  "
                >
                  {{ record.isDisable == "0" ? "启用" : "禁用" }}
                </span>
              </template>
            </a-table-column>
            <a-table-column
              key="action"
              data-index="action"
              align="center"
              width="20%"
            >
              <span slot="title">操作</span>
              <template slot-scope="text, record">
                <a
                  slot="action"
                  v-if="record.isDisable == '0'"
                  href="javascript:;"
                  style="color: #0000ff; border-bottom: 1px solid #0000ff"
                  @click="changeSerIsDisable2('1', record)"
                  >禁用</a
                >

                <a
                  v-if="record.isDisable == '1'"
                  slot="action"
                  href="javascript:;"
                  style="color: #0000ff; border-bottom: 1px solid #0000ff"
                  @click="changeSerIsDisable2('0', record)"
                  >启用</a
                >
              </template>
            </a-table-column>
          </a-table>
        </a-spin>
        <!-- 分页器 -->
        <div style="margin: 20px 0; text-align: center">
          <a-config-provider>
            <a-pagination
              show-size-changer
              :pageSizeOptions="['10', '20', '30']"
              :show-total="
                (total) =>
                  `${$t('m.page.Total')} ${total} ${$t('m.page.items')}`
              "
              @showSizeChange="showChange"
              :buildOptionText="
                (props) =>
                  ` ${props.value} ${$t('m.page.a')}/${$t('m.page.page')}`
              "
              show-quick-jumper
              :default-current="searchData.current"
              :total="total"
              @change="onChangePage"
            />
          </a-config-provider>
        </div>
      </a-col>
      <a-modal
        v-model="platformVisible"
        :title="platformTit"
        width="30%"
        @cancel="cancelAddPlatform"
      >
        <template slot="footer" class="modelBtn">
          <a-button
            @click="cancelAddPlatform"
            style="background: #d7d7d7; color: #fff; border: none"
            >取消</a-button
          >

          <a-button :loading="loading" type="primary" @click="addPlatform"
            >确认</a-button
          >
        </template>
        <a-form-model
          ref="addPlatForm"
          :model="platForm"
          :rules="platFormRule"
          class="plat-form"
        >
          <a-form-model-item label="物流平台" prop="logisticsPlatform">
            <a-input :maxLength="128" v-model="platForm.logisticsPlatform" size="small" />
          </a-form-model-item>
          <a-form-model-item label="物流账号" prop="logisticsAccountNumber">
            <a-input :maxLength="128" v-model="platForm.logisticsAccountNumber" size="small" />
          </a-form-model-item>
          <a-form-model-item label="物流代号" prop="logisticsCode">
            <a-input :maxLength="128" v-model="platForm.logisticsCode" size="small" />
          </a-form-model-item>
          <a-form-model-item label="物流接口" prop="logisticsInterface">
            <a-input :maxLength="128" v-model="platForm.logisticsInterface" size="small" />
          </a-form-model-item>
          <a-form-model-item label="物流key" prop="logisticsKey">
            <a-input :maxLength="128" v-model="platForm.logisticsKey" size="small" />
          </a-form-model-item>
          <a-form-model-item label="国家" prop="country">
            <a-input :maxLength="128" v-model="platForm.country" size="small" />
          </a-form-model-item>
          <div style="display: flex" class="oftime">
            <span
              style="
                width: 120px;
                text-align: right;
                height: 40px;
                line-height: 40px;
                padding-right: 5px;
              "
              ><span style="color: #f00">* </span>时效(天):
            </span>
            <a-form-model-item prop="ofTimeLeft" style="width: 130px">
              <a-input-number
                v-model="platForm.ofTimeLeft"
                size="small"
                :min="1"
                style="width: 100%"
              />
            </a-form-model-item>
            <span style="height: 40px; line-height: 40px; padding: 0 5px"
              >~</span
            >
            <a-form-model-item prop="ofTimeRight" style="width: 130px">
              <a-input-number
                :min="platForm.ofTimeLeft * 1"
                v-model="platForm.ofTimeRight"
                size="small"
                style="width: 100%"
              />
            </a-form-model-item>
          </div>
          <a-form-model-item label="重量单位" prop="weightUnit">
            <a-radio-group
              v-model="platForm.weightUnit"
              @change="onChangeWeightUnit"
            >
              <a-radio :value="0"> 克(g) </a-radio>
              <a-radio :value="1"> 盎司(oz) </a-radio>
              <a-radio :value="2"> 英镑(lb) </a-radio>
            </a-radio-group>
          </a-form-model-item>
          <a-form-model-item label="重量限制">
            <a-input-number
              v-model="platForm.weightLeft"
              size="small"
              style="width: 47%"
            />
            ~
            <a-input-number
              v-model="platForm.weightRight"
              size="small"
              style="width: 47%"
            />
          </a-form-model-item>
          <a-form-model-item label="尺寸限制(cm)">
            <a-input-number
              v-model="platForm.sizeLeft"
              size="small"
              style="width: 47%"
            />
            ~
            <a-input-number
              v-model="platForm.sizeRgiht"
              size="small"
              style="width: 47%"
            />
          </a-form-model-item>
          <a-form-model-item label="运费报价折扣" prop="freightDiscount">
            <a-input-number
              placeholder="运费报价折扣"
              :min="0"
              :max="100"
              style="width: 100%"
              v-model="platForm.freightDiscount"
              :formatter="(value) => `${value}%`"
              :parser="(value) => value.replace('%', '')"
            />
          </a-form-model-item>
          <a-form-model-item label="基础运费最低价" prop="freightLowest">
            <a-input-number
              style="width: 100%"
              placeholder="基础运费最低价"
              v-model="platForm.freightLowest"
              :min="0"
              :formatter="
                (value) => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
              "
              :parser="(value) => `${value}`.replace(/\$\s?|(,*)/g, '')"
              :precision="2"
            />
          </a-form-model-item>
        </a-form-model>
      </a-modal>
      <a-modal v-model="lpViseble" :title="lpTil" width="30%">
        <template slot="footer" class="modelBtn">
          <a-button
            @click="cancelAddser"
            style="background: #d7d7d7; color: #fff; border: none"
            >取消</a-button
          >

          <a-button :loading="loading" type="primary" @click="addPlatSer"
            >确认</a-button
          >
        </template>
        <a-form-model
          :model="serviceForm"
          ref="serviceForm"
          :rules="serviceFormRule"
          class="serviceform"
        >
          <a-form-model-item prop="sysLogisticsServiceItemId" label="物流商">
            <a-select
              show-search
              placeholder="请选择"
              option-filter-prop="children"
              style="width: 200px"
              :filter-option="filterOption"
              @change="changelp"
              v-model="serviceForm.sysLogisticsServiceItemId"
            >
              <a-select-option
                defaultValue="全部"
                :item="item"
                :value="item.sysLogisticsServiceItemId"
                v-for="item in this.services"
                :key="item.sysLogisticsServiceItemId"
                :name="item.serviceName"
              >
                {{ item.serviceName }}
              </a-select-option>
            </a-select>
          </a-form-model-item>
        </a-form-model>
        <a-table :data-source="serTableData" :pagination="false">
          <a-table-column
            key="serviceName"
            data-index="serviceName"
            align="center"
          >
            <span slot="title">物流商</span>
            <template slot-scope="text, record">
              {{ record.serviceName }}
            </template>
          </a-table-column>
          <a-table-column key="isDisable" data-index="isDisable" align="center">
            <span slot="title">是否启用</span>
            <template slot-scope="text, record">
              <span
                :style="
                  record.isDisable == '0' ? 'color:#3eae7c' : 'color:#f00'
                "
              >
                {{ record.isDisable == "1" ? "否" : "是" }}
              </span>
            </template>
          </a-table-column>
          <a-table-column key="action" data-index="serviceName" align="center">
            <span slot="title">操作</span>
            <template slot-scope="text, record">
              <a-popconfirm
                title="确定删除该条数据吗?"
                ok-text="确定"
                cancel-text="取消"
                @confirm="deleteSerRow(record)"
              >
                <a
                  href="javascript:;"
                  style="color: #f00; boder-bottom: 1px solid #f00"
                  >移除</a
                >
              </a-popconfirm>
            </template>
          </a-table-column>
        </a-table>
      </a-modal>
    </a-row>
  </div>
</template>

<script>
import {
  sysTeam_tree,
  plat_savePlatInfo,
  plat_editInfo,
  plat_searchOne,
  plat_editplatDisable,
  pro_searchNotSerce,
  plat_addSerList,
  plat_searchPlatSer,
  pro_editSerInfo,
  pro_editInfo,
} from "@/apis/system/setManage/setLogistics";
export default {
  data() {
    return {
      oldVal: null,
      serTableData: [],
      serviceFormRule: {},
      platFormRule: {
        logisticsPlatform: [
          {
            validator: this.checkLogisticsPlatform,
            trigger: "blur",
            required: true,
          },
        ],
        logisticsAccountNumber: [
          { required: true, message: "请填写物流账号!", trigger: "blur" },
        ],
        logisticsCode: [
          { required: true, message: "请填写物流代号!", trigger: "blur" },
        ],
        logisticsInterface: [
          { required: true, message: "请填写物流接口!", trigger: "blur" },
        ],
        logisticsKey: [
          { required: true, message: "请填写物流key!", trigger: "blur" },
        ],
        ofTimeLeft: [
          { required: true, message: "请填写开始时效!", trigger: "blur" },
        ],
        ofTimeRight: [
          { required: true, message: "请填写结束时效!", trigger: "blur" },
        ],
      },
      windowHeight: document.body.clientHeight, //实时屏幕高度,
      spinning: false,
      tableId: null,
      handleFlag: "add",
      //添加物流商数据
      serviceForm: {
        sysLogisticsServiceItemId: undefined,
        isDelete: "",
      },
      //物流商下拉框的数据
      services: [],
      //新增物流平台的数据
      platForm: {
        logisticsPlatform: null,
        logisticsAccountNumber: null,
        logisticsCode: null,
        logisticsInterface: null,
        logisticsKey: null,
        country: null,
        ofTimeLeft: null,
        ofTimeRight: null,
        weightUnit: null,
        weightLeft: null,
        weightRight: null,
        sizeLeft: null,
        sizeRgiht: null,
        freightDiscount: null,
        freightLowest: null,
      },
      platformTit: "新增物流平台",
      lpTil: "添加物流商",
      lpViseble: false,
      loading: false,
      //新增物流平台模态框
      platformVisible: false,
      autoExpandParent: true,
      //总条数
      total: 0,
      // 物流平台表格数据
      platformTabData: [],
      // 搜索数据
      searchData: {
        current: 1,
        size: 10,
        parentId: "",
      },
      //选中打开的树
      expandedKeys: [],
      treeData: [],
      sort: 0,
    };
  },
  created() {
    this.getSysTeamTree();
  },
  methods: {
    //验证发货物流名称
    checkLogisticsPlatform(rule, value, callback) {
      if (!value) {
        callback(new Error("请填写物流平台！"));
      }
      if (this.oldVal == value) {
        callback();
      }
      this.treeData.forEach((item) => {
        if (value == item.label) {
          callback(new Error("物流平台已存在，请更换名字！"));
        }
      });
      callback();
    },
    //及时修改物流服务的方法
    async changeListEnable(e, record) {
      if (e.target.checked) {
        let res = await pro_editSerInfo(
          record.sysLogisticsServiceItemId,
          record.sysLogisticsServiceWayId,
          { isDisable: 0 }
        );
        if (res.code == "10000") {
          record.isDisable = "0";
          this.getTableList(this.searchData);
        }
      } else {
        let res = await pro_editSerInfo(
          record.sysLogisticsServiceItemId,
          record.sysLogisticsServiceWayId,
          { isDisable: 1 }
        );
        if (res.code == "10000") {
          record.isDisable = "1";
          this.getTableList(this.searchData);
        }
      }
    },
    //即时修改物流服务是否询价
    async onChangeIsEnableInquiry(e, flag, record) {
      if (flag == "change") {
        if (e.target.checked) {
          let res = await pro_editInfo(record.sysLogisticsServiceItemId, {
            isEnableInquiry: "0",
          });
          if (res.code == "10000") {
            record.isEnableInquiry = 0;
            this.getTableList(this.searchData);
          } else {
            return false;
          }
        } else {
          let res = await pro_editInfo(record.sysLogisticsServiceItemId, {
            isEnableInquiry: "1",
          });
          if (res.code == "10000") {
            record.isEnableInquiry = 1;
            this.getTableList(this.searchData);
          } else {
            return false;
          }
        }
      }
    },
    //    //即时修改物流服务是否打单
    async onChangeIsEnablePrint(e, flag, record) {
      if (flag == "change") {
        if (e.target.checked) {
          record.isEnablePrint = 0;
          let res = await pro_editInfo(record.sysLogisticsServiceItemId, {
            isEnablePrint: "0",
          });
          if (res.code == "10000") {
            this.getTableList(this.searchData);
          } else {
            return false;
          }
        } else {
          record.isEnablePrint = 1;
          let res = await pro_editInfo(record.sysLogisticsServiceItemId, {
            isEnablePrint: "1",
          });
          if (res.code == "10000") {
            this.getTableList(this.searchData);
          } else {
            return false;
          }
        }
      }
    },
    // 阻止冒泡
    changeNo() {},
    //关闭添加物流商模态框
    cancelAddser() {
      this.services = [];
      this.serviceForm = {
        sysLogisticsServiceItemId: undefined,
        isDelete: "",
      };
      this.serTableData = [];
      this.lpViseble = false;
    },
    //确认添加物流商
    async addPlatSer() {
      let subArr = JSON.parse(JSON.stringify(this.serTableData));
      subArr.forEach((item) => {
        if (item.isDisable == "是") {
          item.isDisable = 0;
        } else {
          item.isDisable = 1;
        }
      });
      let res = await plat_addSerList(this.serTableData[0].parentID, subArr);
      if (res.code == "10000") {
        this.getSysTeamTree();
        this.cancelAddser();
      }
    },
    //移除物流商
    deleteSerRow(row) {
      this.serTableData.forEach((item, index) => {
        if (item.sysLogisticsServiceItemId === row.sysLogisticsServiceItemId) {
          this.serTableData.splice(index, 1);
        }
      });
    },
    //选择物流商
    changelp(value, options) {
      this.serTableData.push(options.data.attrs.item);
    },
    //平台是否禁用
    async changePlatIsDisable(checked, item) {
      if (checked) {
        let res = await plat_editplatDisable(item.id, item.revision, "0");
        if (res.code == "10000") {
          this.getTableList(this.searchData);
          this.getSysTeamTree();
        }
      } else {
        let res = await plat_editplatDisable(item.id, item.revision, "1");
        if (res.code == "10000") {
          this.getTableList(this.searchData);
          this.getSysTeamTree();
        }
      }
    },
    //物流商是否禁用
    async changeSerIsDisable(checked, item) {
      if (checked) {
        let res = await pro_editInfo(item.id, {
          isDisable: "0",
        });
        if (res.code == "10000") {
          this.getSysTeamTree();
          this.searchData.parentId = item.parentId;
          this.getTableList(this.searchData);
        }
      } else {
        let res = await pro_editInfo(item.id, {
          isDisable: "1",
        });
        if (res.code == "10000") {
          this.getSysTeamTree();
          this.searchData.parentId = item.parentId;
          this.getTableList(this.searchData);
        }
      }
    },
    //表格的物流商是否禁用
    async changeSerIsDisable2(flag, record) {
      if (flag == "1") {
        let res = await pro_editInfo(record.sysLogisticsServiceItemId, {
          isDisable: 1,
        });
        //1
        if (res.code == "10000") {
          this.getSysTeamTree();
          this.getTableList(this.searchData);
        }
      } else if (flag == "0") {
        let res = await pro_editInfo(record.sysLogisticsServiceItemId, {
          isDisable: 0,
        });
        if (res.code == "10000") {
          this.getSysTeamTree();
          this.getTableList(this.searchData);
        }
      }
    },
    onChangeWeightUnit() {},
    //关闭模态框
    cancelAddPlatform() {
      this.platformVisible = false;
      setTimeout(() => {
        this.platForm = {
          logisticsPlatform: null,
          logisticsAccountNumber: null,
          logisticsCode: null,
          logisticsInterface: null,
          logisticsKey: null,
          country: null,
          ofTimeLeft: null,
          ofTimeRight: null,
          weightUnit: null,
          weightLeft: null,
          weightRight: null,
          sizeLeft: null,
          sizeRgiht: null,
          freightDiscount: null,
          freightLowest: null,
        };
      }, 50);
    },
    //点击一级分类
    rowTabData(row) {
      //如果是子数据的话就直接返回
      if (row.hierarchy == "1") {
        return false;
      }
      this.searchData.parentId = row.id;
      this.getTableList(this.searchData);
    },
    //编辑物流平台
    async editPlatForm(row) {
      let res = await plat_searchOne(row.id);
      if (res.code == "200") {
        this.platForm = res.responseBody;
        this.oldVal = this.platForm.logisticsPlatform;
        if (this.platForm.weightUnit) {
          this.platForm.weightUnit = this.platForm.weightUnit * 1;
        }
      }
      this.handleFlag = "edit";
      this.platformVisible = true;
      this.platformTit = "修改物流平台";
    },
    //添加部门模态框显示
    showAddPlatform() {
      this.handleFlag = "add";
      this.platformTit = "新增物流平台";
      this.platformVisible = true;
    },
    //点击平台上的新增物流商
    addTreeModal(item) {
      this.getNotSerList(item);
      this.lpViseble = true;
    },
    //查询未添加的物流商
    async getNotSerList(row) {
      let res = await pro_searchNotSerce(row.id);
      if (res.code == "200") {
        this.services = res.responseBody;
        this.services.forEach((item) => {
          item.parentID = row.id;
        });
      }
    },
    //分页器事件
    onChangePage(pageNumber) {
      this.searchData.current = pageNumber * 1;
      this.getTableList(this.searchData);
    },
    //页码变更
    showChange(current, size) {
      this.searchData.current = current * 1;
      this.searchData.size = size * 1;
      this.getTableList(this.searchData);
    },
    // 树形打开
    onExpand(expandedKeys) {
      this.expandedKeys = expandedKeys;
      this.autoExpandParent = false;
    },
    filterOption(input, option) {
      return (
        option.componentOptions.children[0].text
          .toLowerCase()
          .indexOf(input.toLowerCase()) >= 0
      );
    },
    //获取物流平台树
    async getSysTeamTree() {
      let { code, responseBody } = await sysTeam_tree();
      if (code === "200") {
        this.treeData = this.resetTree(responseBody);
      }
    },
    //重构树
    resetTree(data) {
      data.forEach((item) => {
        item.label = item.title;
        item.key = item.id;
        item.sort = this.sort;
        item.scopedSlots = { title: "title" };
        if (item.children && item.children.length >= 1) {
          this.sort += 1;
          this.resetTree(item.children);
        }
      });
      this.sort = 0;
      return data;
    },
    //重构级联树
    resetBranchTree(data) {
      data.forEach((item) => {
        item.label = item.teamName;
        item.value = item.id;
        item.sort = this.sort;
        item.scopedSlots = { title: "title" };
        if (item.children && item.children.length >= 1) {
          this.resetBranchTree(item.children);
        }
      });
      return data;
    },
    //根据左边物流平台来获取表格数据
    async getTableList(row) {
      this.spinning = true;
      let { code, responseBody } = await plat_searchPlatSer(
        row.parentId,
        this.searchData
      );
      if (code === "200") {
        responseBody.records.forEach((item) => {
          item.key = item.id;
        });
        this.total = responseBody.total * 1;
        this.searchData.size = responseBody.size * 1;
        this.platformTabData = responseBody.records;
        this.spinning = false;
      }
    },
    //模态框确定按钮
    addPlatform() {
      this.loading = true;
      this.$refs.addPlatForm.validate(async (valid) => {
        if (valid) {
          if (this.handleFlag == "add") {
            let res = await plat_savePlatInfo(this.platForm);
            if (res.code == "10000") {
              this.loading = false;
              this.getSysTeamTree();
              this.cancelAddPlatform();
            }
          } else if (this.handleFlag == "edit") {
            let res = await plat_editInfo(
              this.platForm.sysLogisticsId,
              this.platForm.revision,
              this.platForm
            );
            if (res.code == "10000") {
              this.loading = false;
              this.getSysTeamTree();
              this.cancelAddPlatform();
            }
          }
        } else {
          this.loading = false;
          return false;
        }
      });
    },
  },
};
</script>

<style lang="less" scoped>
/deep/.serviceform {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  .ant-form-item {
    display: flex;
  }
}
/deep/.plat-form {
  margin-top: 20px;
  display: flex;
  width: 100%;
  flex-direction: column;
  margin-left: 5%;
  .ant-form-item {
    display: flex;
    .ant-form-item-label {
      width: 120px !important;
    }
    .ant-form-item-control-wrapper {
      width: 50%;
    }
  }
  .oftime {
    .ant-form-item-control-wrapper {
      width: 100%;
    }
  }
}
/deep/.ant-tree {
  li {
    .ant-tree-node-content-wrapper {
      padding-right: 15px;
      width: 90%;
      height: 29px;
      padding-bottom: 3px;
      .treeRow {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .handle {
          .anticon-plus {
            margin: 0 10px;
          }
        }
      }
    }
  }
}
/deep/.ant-modal-body {
  padding: 0;
}
.searchBtn {
  background: #fff;
  color: #3eae7c;
  text-shadow: none;
}
.searchBtn:hover {
  background: #3eae7c;
  color: #fff;
}
.action {
  a {
    border-bottom: 1px solid rgb(41, 41, 224);
    color: rgb(41, 41, 224);
  }
}
</style>
